import service from '@/utils/request'
import qs from 'qs'
// eslint-disable-next-line no-unused-vars
const { httpPostForm, httpPost, httpGet } = service

const request = {
    //获取供应商历史更变
    supplierChangeList (id) {
        return httpPost({
            url: '/outer/change/supplier/list/change/history',
            params: qs.stringify({
                id: id,
            }),
            headers: {
                'Content-Type': 'application/x-www-form-urlencoded'
            }
        })
    },
    //供应商变更新增
    supplierChangeAdd (params) {
        return httpPost({
            url: '/outer/change/supplier/add/change',
            params: params,
        })
    },
    //变更修改供应商
    supplierChangeUpdate (params) {
        return httpPost({
            url: '/outer/change/supplier/update/change',
            params: params,
        })
    },
    //获取变更供应商基础信息
    supplierChangeBase (params) {
        return httpPost({
            url: '/outer/change/supplier/get/change',
            params: qs.stringify({
                id: params,
            }),
            headers: {
                'Content-Type': 'application/x-www-form-urlencoded'
            }
        })
    },
    //供应商变更资质信列表
    supplierQualificationsChangeList (billId) {
        return httpGet({
            url: `/outer/change/supplier/change/qualification/index/${billId}`,
        })
    },
    //供应商变更资质信息新增
    supplierQualificationChangeAdd (params) {
        return httpPost({
            url: '/outer/change/supplier/change/qualification/create',
            params: params,
        })
    },
    //供应商变更业绩列表
    supplierPerformanceChangeList (params) {
        return httpPost({
            url: '/outer/change/supplier/change/performance/index',
            params: params,
        })
    },
    //供应商变更业绩新增
    supplierPerformanceChangeAdd (params) {
        return httpPost({
            url: '/outer/change/supplier/change/performance/create',
            params: params,
        })
    },
}
export default request